<?php
class Action extends Zend_Db_Table
{
	protected $_name = "action";
	
	public function getCommentsAndHistory($issueId)
	{
		$select1 = $this->_db->select()
							->from('changegroup',array('id','author','created','null as action_body'))
							->where('change.issueid = 1');
		$select = $this->_db->select()
							->from($this->_name, 
										array('id', 'author', 'created', 'action_body'))
							->where('action.issueid = 1')
							->union($select1)
							->order("created desc");
		echo $select;			
		$results = $this->getAdapter()->fetchAll($select);
		return $results;
	}
}